package com.feijia.aijingjingus;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.feijia.aijingjingus.util.PreferencesUtils;


public class ShoppingActivity extends AppCompatActivity {
    ImageButton iv_shop;
    RelativeLayout relativeLayout;
    LinearLayout linearLayout3;
    TextView tv_shop;
    @RequiresApi(api = Build.VERSION_CODES.M)
    @SuppressLint("ResourceAsColor")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shopping);

//        if(PreferencesUtils.getString(this,PreferencesUtils.PREFERENCE_NAME).equals("男")){
//            //        用户为男性时修改UI背景色
//            iv_shop=(ImageButton)findViewById(R.id.iv_shop);
//            tv_shop=(TextView)findViewById(R.id.tv_shop);
//            iv_shop.setImageDrawable(getDrawable(R.drawable.communityman));
//            tv_shop.setTextColor(getColor(R.color.womain_pink));
//            relativeLayout=(RelativeLayout)findViewById(R.id.relativeLayout);
//            relativeLayout.setBackground(getDrawable(R.drawable.top_bar_with_shadow_two));
//        }

    }

    public void onClickBack(View view) {
//        Intent intent = new Intent("controlCenterActivity");
//        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
//        startActivity(intent);
    }

    public void onClickDetectionHistory(View view) {
        Intent intent = new Intent("detectionHistoryActivity");
//        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
        startActivity(intent);
//        finish();
    }


    public void onClickUser(View view) {
        Intent intent =new Intent("ImprovePersonalInformationActivity");
//        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);
        startActivity(intent);
//        finish();

    }

    public void onClickDetection(View view) {
        Intent intent = new Intent("controlCenterActivity");
//        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
        startActivity(intent);
//        finish();
    }
}
